package com.financing.platform.vo;

import java.math.BigDecimal;

import com.financing.platform.common.CsvExportable;
import com.financing.platform.util.DateUtil;



/**
 * 销售业绩
 * @author lisu
 *
 */
public class SalesPerformanceVO extends BaseVO implements CsvExportable{


	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String dateStart;//开始时间
	private String dateEnd;//结束时间
	private String serviceConsultantId;//服务顾问 id
	
	private String serviceConsultant;//服务顾问
	private Integer orderCount;//订单数量
	private BigDecimal orderAmount;//订单金额
	private Integer registerPersonCount;//注册数-个人来源
	private Integer registerCompanyCount;//注册数-公司来源
	private Integer visitPersonCount;//回访数-个人来源
	private Integer visitCompanyCount;//回访数-公司来源
	private Integer accountFinancialCount;//明下理财师数

	//private String parentUserId = "'ea8d38ec-680f-11e6-8810-165d8eb0c7d6','ea8d38ec-680f-11e6-8810-165d8eb0c7d6'";
	private String parentUserId = "'23146f5d-6900-11e6-a37f-ecf4bbdf0894','373b4530-6900-11e6-a37f-ecf4bbdf0894','707f4f2d-bdb3-11e6-ba00-d89d672b90bc'";
	
	
	@Override
	public String csvTitle() {
		return "服务顾问,名下理财师数,开单数量,开单金额(万),注册个人来源,注册公司来源,回访已注册用户,回访线下名单导入";
	}

	@Override
	public String toCsvString() {
		StringBuilder builder = new StringBuilder();
		builder.append(getServiceConsultant()).append(",")
		.append(getAccountFinancialCount()).append(",")
		.append(getOrderCount()).append(",")
		.append(getOrderAmount()).append(",")
		.append(getRegisterPersonCount()).append(",")
		.append(getRegisterCompanyCount()).append(",")
		.append(getVisitPersonCount()).append(",")
		.append(getVisitCompanyCount()).append(",");
		return builder.toString();
	}

	public String getDateStart() {
		return dateStart + " 00:00:01";
	}

	public void setDateStart(String dateStart) {
		this.dateStart = dateStart;
	}

	public String getDateEnd() {
		return dateEnd + " 23:59:59";
	}

	public void setDateEnd(String dateEnd) {
		this.dateEnd = dateEnd;
	}

	public String getServiceConsultantId() {
		return serviceConsultantId;
	}

	public void setServiceConsultantId(String serviceConsultantId) {
		this.serviceConsultantId = serviceConsultantId;
	}

	public String getServiceConsultant() {
		return serviceConsultant;
	}

	public void setServiceConsultant(String serviceConsultant) {
		this.serviceConsultant = serviceConsultant;
	}

	public Integer getOrderCount() {
		return orderCount;
	}

	public void setOrderCount(Integer orderCount) {
		this.orderCount = orderCount;
	}

	public BigDecimal getOrderAmount() {
		if(orderAmount != null){
			orderAmount = orderAmount.divide(new BigDecimal(10000),2,BigDecimal.ROUND_HALF_UP);
		}
		
		return orderAmount;
	}

	public void setOrderAmount(BigDecimal orderAmount) {
		this.orderAmount = orderAmount;
	}

	public Integer getRegisterPersonCount() {
		return registerPersonCount;
	}

	public void setRegisterPersonCount(Integer registerPersonCount) {
		this.registerPersonCount = registerPersonCount;
	}

	public Integer getRegisterCompanyCount() {
		return registerCompanyCount;
	}

	public void setRegisterCompanyCount(Integer registerCompanyCount) {
		this.registerCompanyCount = registerCompanyCount;
	}

	public Integer getVisitPersonCount() {
		return visitPersonCount;
	}

	public void setVisitPersonCount(Integer visitPersonCount) {
		this.visitPersonCount = visitPersonCount;
	}

	public Integer getVisitCompanyCount() {
		return visitCompanyCount;
	}

	public void setVisitCompanyCount(Integer visitCompanyCount) {
		this.visitCompanyCount = visitCompanyCount;
	}

	public String getParentUserId() {
		return parentUserId;
	}

	public void setParentUserId(String parentUserId) {
		this.parentUserId = parentUserId;
	}

	public Integer getAccountFinancialCount() {
		return accountFinancialCount;
	}

	public void setAccountFinancialCount(Integer accountFinancialCount) {
		this.accountFinancialCount = accountFinancialCount;
	}

	
	
}
